package model;

import view.drawable.NoeudDrawable;

import java.awt.*;
import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: Thomas
 * Date: 04/02/14
 * Time: 10:16
 * Classe permettant la gestion des Noeud du graph
 */
public class Noeud {
    //id du noeud
    private int id = 0;
    //Nom de la station
    private String name;
    //Objet permettant la gestion graphique du noeud
    private NoeudDrawable noeudDrawable;
    //Liste des arcs partant du noeud
    private ArrayList<Arc> next = new ArrayList<Arc>();

    public Noeud(int id, String name) {
        this.id = id;
        this.name = name;
        NoeudDrawable noeudDrawable = new NoeudDrawable(new Point(0,0),new Dimension(10,10),this);
        this.setNoeudDrawable(noeudDrawable);
    }

    public NoeudDrawable getNoeudDrawable() {
        return noeudDrawable;
    }

    public void setNoeudDrawable(NoeudDrawable noeudDrawable) {
        this.noeudDrawable = noeudDrawable;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ArrayList<Arc> getNext() {
        return next;
    }

    @Override
    public String toString() {
        return "model.Noeud{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
